package com.his.registration.controller;

import com.his.common.Result;
import com.his.registration.pojo.MedicalTechnology;
import com.his.registration.service.MedicalTechnologyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: workspace-idea
 * @BelongsPackage: com.his.registration.controller
 * @Author: ZhangYing
 * @Date: 2023/7/6 11:01
 * @Description:
 */
@RestController
@CrossOrigin
@RequestMapping("/medicaltechnology")
public class MedicalTechnologyController {
    @Autowired
    private MedicalTechnologyService medicalTechnologyService;

    //根据医技类型和名称来查询
    @RequestMapping("/selectByCondition")
    public Result selectByCondition(String techType, String techName){
        List<MedicalTechnology> medicalTechnologyList = medicalTechnologyService.selectByType(techType, techName);
        return Result.success(medicalTechnologyList);
    }
}
